<?php
header("Content-Type: text/html; charset=utf-8");
$tm = $_GET['tm'];
$da = json_decode($tm,true);
switch ($da[0]) {
	case A: $xz='capricorn'; $mc="♑️摩羯座" ;break;
	case B: $xz='aquarius'; $mc="♒️水瓶座" ;break;
	case C: $xz='pisces'; $mc="♓️双鱼座" ;break;
	case D: $xz='aries'; $mc="♈️牡羊座" ;break;
	case E: $xz='taurus'; $mc="♉️金牛座" ;break;
	case F: $xz='gemini'; $mc="♊️双子座" ;break;
	case G: $xz='cancer'; $mc="♋️巨蟹座" ;break;
	case H: $xz='leo'; $mc="♌️狮子座" ;break;
	case I: $xz='virgo'; $mc="♍️处女座" ;break;
	case J: $xz='libra'; $mc="♎️天秤座" ;break;
	case K: $xz='scorpio'; $mc="♏️天蝎座" ;break;
	case L: $xz='sagittarius'; $mc="♐️射手座" ;break;
}
$str=file_get_contents('http://app.data.qq.com/?umod=astro&act=astro&jsonp=1&func=TodatTpl&t=4&a='.$xz.'&y=2019&m='.date(m).'&d='.date(d));
$str = substr($str , 9,-2);
$arr=json_decode($str,true);
$arr2=array();
$arr3=array();
foreach($arr['fortune'] as $val){
	$arr2[]=$val['type'];
	$arr3[]=$val['content'];
};
$data=array('csm'=>$mc."的今日分析",'dfjs'=>"综合情况:",'df'=>$arr3[0].' 速配'.$arr3[7],'bq1' =>"🌹 ".$arr2[1].':'.$arr3[1],'bq2'=>"💻 ".$arr2[2].':'.$arr3[2],'bq3'=>"💰 ".$arr2[3].':'.$arr3[3],'bq4'=>"🏂 ".$arr2[4].':'.$arr3[4],'bq5'=>'🍀幸运数字|颜色:'.$arr3[6].'-'.$arr3[5],'ztpj'=>null);
$data[ztpj]=str_replace('?','？',$arr3[8]);
echo json_encode($data,JSON_UNESCAPED_UNICODE);
?>